package Controller.Member;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

import Bean.MemberBean;
import Dao.MemberDao;

public class MemberUpdateForm implements Controller{
	private MemberDao member;
	public void setMember(MemberDao member) {
		this.member = member;
	}
	
	@Override
	public ModelAndView handleRequest(HttpServletRequest req,
			HttpServletResponse res) throws Exception {
		String m_id = req.getParameter("m_id");
		
		MemberBean myinfo = new MemberBean();
		myinfo.setM_id(m_id);
		myinfo = member.mUpdateForm(myinfo);
		System.out.println(myinfo.getM_id());
		ModelAndView mav = new ModelAndView();
		mav.setViewName("myUpdateForm");
		mav.addObject("myinfo", myinfo);
		return mav;
	}

}
